package com.cskaoyan.market.db.admin.vo;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;

import lombok.Data;

/**
 * @author 小焦
 * @since 2023/03/18 21:45
 */
@Data
public class BaseStorageCreateVo {

    /**
     * id : 37 key : 30lvosznqthnwlqi916d.jpg name : 004.jpg type : image/jpeg size : 92143 url :
     * http://localhost:8083/wx/storage/fetch/30lvosznqthnwlqi916d.jpg addTime : 2023-03-18 21:39:59 updateTime :
     * 2023-03-18 21:39:59
     */

    private Integer id;
    private String key;
    private String name;
    private String type;
    private Integer size;
    private String url;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime addTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime updateTime;

}
